<p class="Paragraph"><help:paragraphinfo state="U" number="3" xmlns:help="http://openoffice.org/2000/help"/>The Basic Editor provides the standard editing functions you are familiar with when working in a text document. It supports the functions of the <span class="T1">Edit</span> menu (Cut, Delete, Paste), the ability to select text with the Shift key, as well as cursor positioning functions (for example, moving from word to word with <help:switch select="System" xmlns:help="http://openoffice.org/2000/help"><help:case select="MAC">Option</help:case><help:default>Ctrl</help:default></help:switch> and the arrow keys).</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="31" xmlns:help="http://openoffice.org/2000/help"/>Long lines can be split into several parts by inserting an underline character _ as the last character of a line. This connects the line with the following line to one logical line.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="32" xmlns:help="http://openoffice.org/2000/help"/>If you press the <span class="T1">Run</span> icon in the Object bar, program execution starts at the first line of the Basic editor. The "Sub Main" does <span class="T2">not</span> take precedence on program execution.</p>
<p class="Head2"><help:paragraphinfo state="U" number="4" xmlns:help="http://openoffice.org/2000/help"/>Navigating in a Project</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/>Select a library from the <span class="T1">Library</span> list at the left of the toolbar to load the library in the editor. The first module of the selected library will be displayed.</p>
<p class="Paragraph"><help:paragraphinfo state="U" number="16" xmlns:help="http://openoffice.org/2000/help"/>You can save Basic code in a text file for saving and importing in other programming systems.</p>
<p class="TextInTable"><help:paragraphinfo state="U" number="25" xmlns:help="http://openoffice.org/2000/help"/>You cannot save Basic dialogs to a text file.</p>
</span></th></tr></table>
<p class="Head3"><help:paragraphinfo state="U" number="17" xmlns:help="http://openoffice.org/2000/help"/>Saving Source Code to a Text File</p>
<ol class="L1">
<li class="">
<p class="P2"><help:paragraphinfo state="U" number="18" xmlns:help="http://openoffice.org/2000/help"/>Select the module that you want to export as text from the object catalog.</p>
</li>
<li class="">
<p class="P2"><help:paragraphinfo state="U" number="19" xmlns:help="http://openoffice.org/2000/help"/>Click the <span class="T1">Save Source As</span> icon in the Macro toolbar.</p>
</li>
<li class="">
<p class="P2"><help:paragraphinfo state="U" number="20" xmlns:help="http://openoffice.org/2000/help"/>Select a file name and click <span class="T1">OK</span> to save the file.</p>
</li>
</ol>
<p class="Head3"><help:paragraphinfo state="U" number="21" xmlns:help="http://openoffice.org/2000/help"/>Loading Source Code From a Text File</p>
<ol class="L2">
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="22" xmlns:help="http://openoffice.org/2000/help"/>Select the module where you want to import the source code from the object catalog.</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="23" xmlns:help="http://openoffice.org/2000/help"/>Position the cursor where you want to insert the program code.</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="24" xmlns:help="http://openoffice.org/2000/help"/>Click the <span class="T1">Insert Source Text</span> icon in the Macro toolbar.</p>
</li>
<li class="">
<p class="P3"><help:paragraphinfo state="U" number="33" xmlns:help="http://openoffice.org/2000/help"/>Select the text file containing the source code and click <span class="T1">OK</span>.</p>